% Comandos para el índice de referencias cruzadas
\newcommand{\infinity}{\infty}

\newcommand{\ici}[1]
  {\index{#1}}
 
\newcommand{\pci}[1]
  {\index{Práctica!#1}}
 
\newcommand{\ci}[1]
  {\index{#1}#1}
 
\newcommand{\cei}[1]
  {\index{#1}\emph{#1}}

\newcommand{\ceis}[2]
  {\index{#2}\emph{#1}}

\newcommand{\tei}[1]
  {\index{#1}{{\tt #1}}}

\newcommand{\I}[1]
  {\it #1}

\newcommand{\teis}[2]
  {\index{#2}{{\tt #1}}}

\newcommand{\xsub}[1]
  {\index{XSUB!{\tt #1}}
   {\tt #1}
  }

\newcommand{\typemap}[1]
  {\index{typemap!{\tt #1}}
   {\tt #1}
  }

\newcommand{\code}[1]
  {{\tt #1}}

\newcommand{\api}[1]
  {\index{Perl API!{\tt #1}}
   {\tt #1}
  }


\newcommand{\parrafo}[1]
{ 
  \paragraph{#1}
  \begin{tabular}{c}
  \end{tabular}
}

\newcommand{\sectionpractica}[1]
  {\section{Práctica: #1}
   \index{Práctica!#1}
  }

\newcommand{\subsectionpractica}[1]
  {\subsection{Práctica: #1}
   \index{Práctica!#1}
  }

\newcommand{\subsubsectionpractica}[1]
  {\subsubsection{Práctica: #1}
   \index{Práctica!#1}
  }

\newcommand{\sectionejercicio}[1]
  {\section{Ejercicio: #1}
   \index{Ejercicio!#1}
  }

\newcommand{\subsectionejercicio}[1]
  {\subsection{Ejercicio: #1}
   \index{Ejercicio!#1}
  }

\newcommand{\subsubsectionejercicio}[1]
  {\subsubsection{Ejercicio: #1}
   \index{Ejercicio!#1}
  }


\newcommand{\subsectionrepaso}[1]
  {\subsection{Repaso: #1}
   \index{Repaso!#1}
  }

\newcommand{\eref}[1]
  {\externalref{#1} \cite{CasianoIntroAPerl}}

\newcommand{\cpan}[1]
{\htmladdnormallink{{\tt #1}}
{http://search.cpan.org/perldoc?#1}}

\newcommand{\perldocf}[1]
{\htmladdnormallink{{\tt #1}}
{http://www.ayni.com/perldoc/functions/#1.html}}

\newcommand{\cpandist}[1]
{\htmladdnormallink{{\tt #1}}
{http://search.cpan.org/dist/#1}}

\newcommand{\cpanauthor}[1]
{\htmladdnormallink{\~{}#1}
{http://search.cpan.org/\~{}#1}}

\newcommand{\perlmarkmail}[1]
{\htmladdnormallink{#1}
{http://perl.markmail.org/search/?q=#1}}

\newcommand{\perlmonk}[1]
{\htmladdnormallink{PerlMonks}
{http://www.perlmonks.org/?node_id=#1}}

\newcommand{\link}[2]
{\htmladdnormallink{#1}
{#2}}

\newcommand{\wikipedia}[1]
{\htmladdnormallink{wikipedia}
{http://en.wikipedia.org/wiki/#1}}

\newtheorem{definition}{Definición}[section] 
\newtheorem{theorem}{Teorema}[section] 
\newtheorem{algorithm}{Algoritmo}[section] 
\newtheorem{program}{Programa}[section] 
\newtheorem{exercise}{Ejercicio}[section] 
%\newtheorem{lab}{Práctica \addcontentsline{toc}{section}{hola}}[section] 

\newtheorem{example}{Ejemplo}[section] 
\newtheorem{execution}{Ejecución}[section] 
\newtheorem{listing}{Listado}[section] 
\newtheorem{advice}{Consejo}[section] 
\newtheorem{scheme}{Esquema}[section] 


